# add the local Modules directory to the modules path
if(WIN32)
  set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/yaml_cpp_vendor/CMake")
else()
  set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/yaml_cpp_vendor/share/cmake/yaml-cpp")
endif()
message(STATUS "Setting yaml-cpp_DIR to: '${yaml-cpp_DIR}'")

find_package(yaml-cpp REQUIRED)

set(yaml_cpp_vendor_LIBRARIES ${YAML_CPP_LIBRARIES})
set(yaml_cpp_vendor_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})

list(APPEND yaml_cpp_vendor_TARGETS yaml-cpp)
if(WIN32)
  # On Windows, yaml-cpp 0.7.0 requires that downstream consumers set YAML_CPP_DLL and
  # not yaml_cpp_EXPORT in order to set dllimport properly.
  # This behavior will likely change in future versions of yaml-cpp.
  set_target_properties(yaml-cpp PROPERTIES INTERFACE_COMPILE_DEFINITIONS YAML_CPP_DLL)
endif()
